package com.chenfan.mcn.model.dto;

import com.chenfan.common.extension.validation.groups.Modify;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 红人刊例详情编辑DTO
 *
 * @author wulg
 * @date 2022-01-08
 **/
@Data
public class StarRateCardDetailSaveDTO implements Serializable {

    private static final long serialVersionUID = 6435045982509653037L;

    /**
     * 刊例ID
     */
    private Long cardId;

    /**
     * 确认状态：0未确认、1已确认
     */
    private Integer confirmStatus;

    /**
     * 刊例明细
     */
    List<StarRateCardItem> items;


    /**
     * 报价方式填写明细
     */
    @Data
    public static class StarRateCardItem {

        /**
         * 刊例明细ID
         */
        @NotNull(message = "刊例明细ID不能为空", groups = {Modify.class})
        private Long id;

        /**
         * 自定义信息
         */
        @NotBlank(message = "自定义信息不能为空", groups = {Modify.class})
        private String quoteWayData;

        /**
         * 自定义信息
         */
        @NotBlank(message = "报价信息不能为空", groups = {Modify.class})
        private String quoteInfoData;
    }

}
